﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PrpductUI.aspx.cs" Inherits="UI.PrpductUI" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style>
        * {
        text-align :center;
        }
        table{
            border:1px solid  pink;
            background-color:aquamarine;
        }
        tr{
            width:100px;
            height:70px;
            border:1px solid pink;
        }
        td{
            width:100px;
            height:5px;
        }
        Image1{
            border:1px solid black;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            
            <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                <HeaderTemplate>
               <table>
                <tr>
                    <td>商品编号</td>
                     <td>商品名称</td>
                     <td>商品类别</td>
                     <td>商品图片</td>
                     <td>商品价格</td>
                     <td>操作</td>
                     <td>操作</td>
                     <td>操作</td>
                </tr>
                </HeaderTemplate>
                <ItemTemplate>
                         <tr>
                            <td><%# Eval("Pid") %></td>
                             <td><%# Eval("PName") %></td>
                             <td><%# Eval("PClass") %></td>
                             <td><asp:Image ID="Image1" runat="server" ImageUrl='<%#"Image\\"+Eval("PImg") %>' Width="50px" Height="50px"/></td>
                             <td><%# Eval("PPrice") %></td>
                             <td><asp:Button ID="Button1" runat="server" Text="删除" CommandName ="deleat" CommandArgument='<%#Eval("Pid") %>' /></td>
                             <td><asp:Button ID="Button2" runat="server" Text="添加" CommandName ="inster" /></td>
                             <td><asp:Button ID="Button3" runat="server" Text="修改" CommandName ="update" CommandArgument='<%#Eval("Pid") %>'/></td>
                        </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </div>
    </form>
</body>
</html>
